Page({
  data: {
    list: [],
  },

  onLoad: function (options) {
    var CLIENT_NO = wx.getStorageSync("CLIENT_NO");
    if (CLIENT_NO === '00000') {

      var slist = [{
        id: 'carRealtimeCity',
        name: '车辆实时在线统计(市)',
      }, {
        id: 'roadTaskCity',
        name: '道路作业率排名统计(市)',
      }, {
        id: 'roadCompliance',
        name: '道路达标统计',
      }, {
        id: 'roadMapShow',
        name: '道路作业展示',
      }, {
        id: 'carDeployment',
        name: '车辆出动统计',
      }, {
        id: 'carDeploymentNoNum',
        name: '车辆未出动统计',
      }]
    } else {
      var slist = [{
        id: 'carRealtime',
        name: '车辆实时在线统计',
      }, {
        id: 'roadTask',
        name: '道路作业统计',
      }, {
        id: 'roadCompliance',
        name: '道路达标统计',
      }, {
        id: 'roadMapShow',
        name: '道路作业展示',
      },{
        id: 'carDeployment',
        name: '车辆出动统计',
      }, {
        id: 'carDeploymentNoNum',
        name: '车辆未出动统计',
      }]
    }
    this.setData({
      list: slist
    })
  },
  kindToggle(e) {
    const id = e.currentTarget.id;
    // console.log(id)
    switch (id) {
      case 'roadMapShow':
        // ../../packageExtend/pages/{{item.father}}/{{page}}/{{page}}
        wx.navigateTo({
          url: '../../packageStatistics/pages/roadMapShow/index'
        })
        break;
      case 'carRealtime':
        // ../../packageExtend/pages/{{item.father}}/{{page}}/{{page}}
        wx.navigateTo({
          url: '../../packageStatistics/pages/carRealtime/carRealtime'
        })
        break;
      case 'carRealtimeCity':
        // ../../packageExtend/pages/{{item.father}}/{{page}}/{{page}}
        wx.navigateTo({
          url: '../../packageStatistics/pages/carRealtimeCity/index'
        })
        break;
      case 'roadTask':
        wx.navigateTo({
          url: '../../packageStatistics/pages/roadTaskStatistics/roadTaskStatistics?clientNo=' + wx.getStorageSync("CLIENT_NO")
        })
        break;
      case 'roadTaskCity':
        wx.navigateTo({
          url: '../../packageStatistics/pages/roadTaskCity/roadTask'
        })
        break;
      case 'roadCompliance':
        wx.navigateTo({
          url: '../../packageStatistics/pages/roadCompliance/index'
        })
        break;
      case 'carDeployment':
        wx.navigateTo({
          url: '../../packageStatistics/pages/carDeployment/index'
        })
        break;
      case 'carDeploymentNoNum':
        wx.navigateTo({
          url: '../../packageStatistics/pages/carDeploymentNoNum/index'
        })
        break;
      case 'WorkRoad':
        wx.navigateTo({
          url: '../../packageStatistics/pages/WorkRoad/index'
        })
        break;
      case 'WorkRoadNo':
        wx.navigateTo({
          url: '../../packageStatistics/pages/WorkRoadNo/index'
        })
        break;
      default:
        break;
    }

  },
})